<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
This file is Copyright (c) 2010 by the GPSD project
SPDX-License-Identifier: BSD-2-clause
-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
                   "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry>
<refentryinfo><date>13 May 2005</date></refentryinfo>
<refmeta>
<refentrytitle>libgpsmm</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo class="source">The GPSD Project</refmiscinfo>
<refmiscinfo class="manual">GPSD Documentation</refmiscinfo>
</refmeta>
<refnamediv id='name'>
<refname>libgpsmm</refname>
<refname>libQgpsmm</refname>
<refpurpose>C++ and QT class wrapper for the GPS daemon</refpurpose>
</refnamediv>
<refsynopsisdiv id='synopsis'>
<funcsynopsis>
<funcsynopsisinfo>

C++:

#include &lt;libgpsmm&gt;

</funcsynopsisinfo>
<funcprototype>
<funcdef>struct gps_data_t *<function>open</function></funcdef>
    <paramdef>char *<parameter>host</parameter></paramdef>
    <paramdef>char *<parameter>port</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>struct gps_data_t *<function>open</function></funcdef>
    <paramdef>void</paramdef>
</funcprototype>
<funcprototype>
<funcdef>struct gps_data_t *<function>send</function></funcdef>
    <paramdef>char *<parameter>request</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>struct gps_data_t *<function>read</function></funcdef>
    <paramdef>void</paramdef>
</funcprototype>
<funcprototype>
<funcdef>struct gps_data_t *<function>waiting</function></funcdef>
    <paramdef>int</paramdef>
</funcprototype>
<funcprototype>
<funcdef>struct gps_data_t *<function>stream</function></funcdef>
    <paramdef>unsigned int<parameter>flags</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>

<refsect1 id='description'><title>DESCRIPTION</title>

<para><emphasis remap='B'>libgpsmm and libQgpsmm</emphasis> are mere wrappers over
<emphasis remap='B'>libgps</emphasis>. The important difference between the libraries is that libgpsmm is targeted at C++ applications and contained in <emphasis remap='B'>libgps</emphasis>, while libQgpsmm is platform independent by using QTcpSocket to connect to <emphasis remap='B'>gpsd</emphasis> and shipped as an additional library due to the necessary linking to QT.
Method names are the same as
the analogue C functions. For a detailed description of the functions
please read
<citerefentry><refentrytitle>libgps</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
<function>open()</function> must be called after class constructor and before any other method
(<function>open()</function> is not inside the constructor since it may fail, however constructors have no return value).
The analogue of the C function <function>gps_close()</function> is in the destructor.</para>
</refsect1>

<refsect1 id='see_also'><title>SEE ALSO</title>
<para>
<citerefentry><refentrytitle>gpsd</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>gps</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>libgps</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
</para>
</refsect1>

<refsect1 id='author'><title>AUTHOR</title>
<para>Alfredo Pironti &lt;alfredio@users.sourceforge.net&gt;.</para>
</refsect1>
</refentry>

